home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / xfcn / spttool.cpt / Support Tools eXternals 1.2.5 / background_3858.txt < prev    next >
Text File  |  1990-11-13  |  9KB  |  413 lines

  1. -- background: 3858 from stack: in.5
  2. -- bmap block id: 4349
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: Examples
  6. ----- HyperTalk script -----
  7. on OpenCard
  8.   put the number of cds of this bg into total
  9.   put (the number of this cd - 1) into which
  10.   put which & "/" & total into bg fld "card count"
  11.   if the number of this cd = (number of last cd of this bg) then
  12.     hide bg btn "next"
  13.   else
  14.     show bg btn "next"
  15.   end if
  16.  
  17.   if the number of this cd = (number of first cd of this bg) then
  18.     hide bg btn "previous"
  19.   else
  20.     show bg btn "previous"
  21.   end if
  22.  
  23.   if bg fld "source" = empty then
  24.     hide bg btn "source"
  25.   else
  26.     set the scroll of bg fld "source" to 0
  27.     show bg btn "source"
  28.   end if
  29.   pass OpenCard
  30. end OpenCard
  31.  
  32. on CloseCard
  33.   -- make sure that the description field is always kept at it's
  34.   -- smallest size
  35.   if rect of fld "description" Γëá "258,116,509,336" then ZoomField
  36.   set the scroll of bg fld "description" to 0
  37.   if the visible of bg fld "source" then send mouseUP to bg btn "source"
  38.   pass CloseCard
  39. end CloseCard
  40.  
  41. on ZoomField
  42.   -- resize the description field
  43.   --258,116,509,336
  44.   lock screen
  45.   if the rect of fld "description" is not "258,116,509,336" then
  46.     set rect of fld "description" to "258,116,509,336"
  47.     set icon of bg btn "window zoom" to "to small"
  48.     send "showObjects" to this cd
  49.   else
  50.     set rect of fld "description" to "25,116,509,336"
  51.     set icon of bg btn "window zoom" to "to big"
  52.     send "hideObjects" to this cd
  53.   end if
  54.   unlock screen
  55. end ZoomField
  56.  
  57.  
  58.  
  59.  
  60. -- part 43 (button)
  61. -- low flags: 00
  62. -- high flags: 0000
  63. -- rect: left=129 top=54 right=85 bottom=166
  64. -- title width / last selected line: 0
  65. -- icon id / first selected line: 12011 / 12011
  66. -- text alignment: 1
  67. -- font id: 0
  68. -- text size: 12
  69. -- style flags: 0
  70. -- line height: 16
  71. -- part name: 
  72. ----- HyperTalk script -----
  73. on mouseUp
  74.   answer "Source for this external not included yet."
  75. end mouseUp
  76.  
  77.  
  78.  
  79. -- part 28 (button)
  80. -- low flags: 00
  81. -- high flags: 0000
  82. -- rect: left=246 top=60 right=84 bottom=279
  83. -- title width / last selected line: 0
  84. -- icon id / first selected line: 1728 / 1728
  85. -- text alignment: 1
  86. -- font id: 0
  87. -- text size: 12
  88. -- style flags: 0
  89. -- line height: 16
  90. -- part name: 
  91.  
  92.  
  93. -- part 29 (button)
  94. -- low flags: 00
  95. -- high flags: 0000
  96. -- rect: left=284 top=60 right=84 bottom=317
  97. -- title width / last selected line: 0
  98. -- icon id / first selected line: 1731 / 1731
  99. -- text alignment: 1
  100. -- font id: 0
  101. -- text size: 12
  102. -- style flags: 0
  103. -- line height: 16
  104. -- part name: 
  105.  
  106.  
  107. -- part 13 (button)
  108. -- low flags: 00
  109. -- high flags: 2000
  110. -- rect: left=87 top=54 right=85 bottom=124
  111. -- title width / last selected line: 0
  112. -- icon id / first selected line: 300 / 300
  113. -- text alignment: 1
  114. -- font id: 0
  115. -- text size: 12
  116. -- style flags: 0
  117. -- line height: 16
  118. -- part name: Index
  119. ----- HyperTalk script -----
  120. on mouseUp
  121.   go cd 1
  122. end mouseUp
  123.  
  124.  
  125.  
  126. -- part 17 (button)
  127. -- low flags: 00
  128. -- high flags: 2000
  129. -- rect: left=11 top=54 right=85 bottom=45
  130. -- title width / last selected line: 0
  131. -- icon id / first selected line: 19678 / 19678
  132. -- text alignment: 1
  133. -- font id: 0
  134. -- text size: 12
  135. -- style flags: 0
  136. -- line height: 16
  137. -- part name: About
  138. ----- HyperTalk script -----
  139. on mouseUp
  140.   push cd
  141.   go cd "about"
  142. end mouseUp
  143.  
  144.  
  145.  
  146. -- part 20 (field)
  147. -- low flags: 00
  148. -- high flags: 2007
  149. -- rect: left=258 top=116 right=336 bottom=509
  150. -- title width / last selected line: 0
  151. -- icon id / first selected line: 0 / 0
  152. -- text alignment: 0
  153. -- font id: 3
  154. -- text size: 10
  155. -- style flags: 0
  156. -- line height: 13
  157. -- part name: description
  158.  
  159.  
  160. -- part 25 (button)
  161. -- low flags: 00
  162. -- high flags: 2001
  163. -- rect: left=194 top=60 right=84 bottom=227
  164. -- title width / last selected line: 0
  165. -- icon id / first selected line: 1727 / 1727
  166. -- text alignment: 1
  167. -- font id: 0
  168. -- text size: 12
  169. -- style flags: 0
  170. -- line height: 16
  171. -- part name: Return
  172. ----- HyperTalk script -----
  173. on mouseUp
  174.   -- pop a card, but only if the destination is within this stack
  175.   pop cd into destinationCd
  176.   visual iris close
  177.   if destinationCd contains the long name of this stack then
  178.     go destinationCd
  179.   else
  180.     go cd 1
  181.   end if
  182. end mouseUp
  183.  
  184.  
  185.  
  186.  
  187. -- part 26 (button)
  188. -- low flags: 80
  189. -- high flags: 2001
  190. -- rect: left=246 top=60 right=84 bottom=279
  191. -- title width / last selected line: 0
  192. -- icon id / first selected line: 1729 / 1729
  193. -- text alignment: 1
  194. -- font id: 0
  195. -- text size: 12
  196. -- style flags: 0
  197. -- line height: 16
  198. -- part name: Previous
  199. ----- HyperTalk script -----
  200. on mouseUp
  201.   visual wipe right
  202.   go prev card
  203. end mouseUp
  204.  
  205.  
  206.  
  207. -- part 27 (button)
  208. -- low flags: 00
  209. -- high flags: 2001
  210. -- rect: left=284 top=60 right=84 bottom=317
  211. -- title width / last selected line: 0
  212. -- icon id / first selected line: 1730 / 1730
  213. -- text alignment: 1
  214. -- font id: 0
  215. -- text size: 12
  216. -- style flags: 0
  217. -- line height: 16
  218. -- part name: Next
  219. ----- HyperTalk script -----
  220. on mouseUp
  221.   visual wipe left
  222.   go next card
  223. end mouseUp
  224.  
  225.  
  226.  
  227. -- part 33 (button)
  228. -- low flags: 00
  229. -- high flags: 0000
  230. -- rect: left=424 top=90 right=104 bottom=444
  231. -- title width / last selected line: 0
  232. -- icon id / first selected line: 572 / 572
  233. -- text alignment: 1
  234. -- font id: 0
  235. -- text size: 12
  236. -- style flags: 0
  237. -- line height: 16
  238. -- part name: current font
  239.  
  240.  
  241. -- part 34 (button)
  242. -- low flags: 00
  243. -- high flags: 0000
  244. -- rect: left=407 top=90 right=117 bottom=480
  245. -- title width / last selected line: 0
  246. -- icon id / first selected line: 0 / 0
  247. -- text alignment: 1
  248. -- font id: 0
  249. -- text size: 12
  250. -- style flags: 0
  251. -- line height: 16
  252. -- part name: Font Box
  253. ----- HyperTalk script -----
  254. on mouseDown
  255.   --395,22,468,51
  256.   put item 3 of rect of me - 8 into hMax
  257.   put item 1 of rect of me + 8 into hMin
  258.   put "bg btn" &"e&"current font""e into scrollThumb
  259.   put item 4 of rect of me -18  into Vert
  260.   repeat
  261.     set cursor to cross
  262.     put item 1 of the mouseLoc into Horiz
  263.     if Horiz > hMax then put hMax into Horiz -- don't allow to drag outside far right
  264.     if Horiz < hMin then put hMin into Horiz -- don't allow to drag outside much
  265.     put abs((hMin - Horiz - 9) div 19) into siZe -- change to ordinal
  266.     show scrollThumb at hMin + (19*siZe),Vert-siZe*2 -- move to nearest size
  267.     if the mouse is up then
  268.       changeSize siZe                           -- change font as requested
  269.       exit repeat
  270.     end if
  271.   end repeat
  272. end mouseDown
  273.  
  274. on changeSize whichSize
  275.   if whichSize is 1 then put 10 into changeSize
  276.   else
  277.     if whichSize is 2 then put 12 into changeSize
  278.     else
  279.       if whichSize is 3 then put 14 into changeSize
  280.       else
  281.         put 9 into changeSize      -- end up with 10 if error
  282.       end if
  283.     end if
  284.   end if
  285.   set textSize of bg fld "description" to changeSize
  286. end changeSize
  287.  
  288.  
  289.  
  290. -- part 36 (button)
  291. -- low flags: 00
  292. -- high flags: 2000
  293. -- rect: left=488 top=95 right=114 bottom=507
  294. -- title width / last selected line: 0
  295. -- icon id / first selected line: 576 / 576
  296. -- text alignment: 1
  297. -- font id: 0
  298. -- text size: 12
  299. -- style flags: 0
  300. -- line height: 16
  301. -- part name: window zoom
  302. ----- HyperTalk script -----
  303. on mouseUp
  304.   ZoomField
  305. end mouseUp
  306.  
  307.  
  308.  
  309.  
  310. -- part 38 (field)
  311. -- low flags: 00
  312. -- high flags: 0000
  313. -- rect: left=449 top=2 right=21 bottom=512
  314. -- title width / last selected line: 0
  315. -- icon id / first selected line: 0 / 0
  316. -- text alignment: 0
  317. -- font id: 4
  318. -- text size: 12
  319. -- style flags: 0
  320. -- line height: 16
  321. -- part name: card count
  322.  
  323.  
  324. -- part 40 (button)
  325. -- low flags: 00
  326. -- high flags: 2000
  327. -- rect: left=49 top=54 right=85 bottom=83
  328. -- title width / last selected line: 0
  329. -- icon id / first selected line: 263 / 263
  330. -- text alignment: 1
  331. -- font id: 0
  332. -- text size: 12
  333. -- style flags: 0
  334. -- line height: 16
  335. -- part name: report bugs
  336. ----- HyperTalk script -----
  337. on mouseUp
  338.   push cd
  339.   go cd "report bugs"
  340. end mouseUp
  341.  
  342.  
  343.  
  344. -- part 41 (button)
  345. -- low flags: 80
  346. -- high flags: 2000
  347. -- rect: left=129 top=53 right=84 bottom=166
  348. -- title width / last selected line: 0
  349. -- icon id / first selected line: 12012 / 12012
  350. -- text alignment: 1
  351. -- font id: 0
  352. -- text size: 12
  353. -- style flags: 0
  354. -- line height: 16
  355. -- part name: source
  356. ----- HyperTalk script -----
  357. on mouseUp
  358.   if the visible of bg fld "source" then
  359.     lock screen
  360.     hide bg fld "source"
  361.     set the scroll of bg fld "source" to 0
  362.     ShowObjects
  363.   else
  364.     lock screen
  365.     if rect of fld "description" Γëá "258,116,509,336" then ZoomField
  366.     HideObjects
  367.     show bg fld "source"
  368.   end if
  369. end mouseUp
  370.  
  371.  
  372.  
  373. -- part 42 (field)
  374. -- low flags: 80
  375. -- high flags: 2007
  376. -- rect: left=7 top=91 right=336 bottom=509
  377. -- title width / last selected line: 0
  378. -- icon id / first selected line: 0 / 0
  379. -- text alignment: 0
  380. -- font id: 3
  381. -- text size: 9
  382. -- style flags: 0
  383. -- line height: 12
  384. -- part name: Source
  385.  
  386.  
  387. -- part 49 (field)
  388. -- low flags: 01
  389. -- high flags: 0000
  390. -- rect: left=331 top=19 right=50 bottom=495
  391. -- title width / last selected line: 0
  392. -- icon id / first selected line: 0 / 0
  393. -- text alignment: 65535
  394. -- font id: 15
  395. -- text size: 24
  396. -- style flags: 0
  397. -- line height: 32
  398. -- part name: Title
  399.  
  400.  
  401. -- part 50 (field)
  402. -- low flags: 01
  403. -- high flags: 0000
  404. -- rect: left=347 top=47 right=79 bottom=499
  405. -- title width / last selected line: 0
  406. -- icon id / first selected line: 0 / 0
  407. -- text alignment: 65535
  408. -- font id: 15
  409. -- text size: 12
  410. -- style flags: 0
  411. -- line height: 16
  412. -- part name: expl
  413.